package com.jims.master.modules.doctor.netHosptial.service;


import com.jims.master.common.persistence.Page;
import com.jims.master.common.service.CrudService;
import com.jims.master.modules.doctor.netHosptial.dao.NetLiveRequisitionDao;
import com.jims.master.modules.doctor.netHosptial.entity.NetLiveRequisition;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * 入院通知Service
 * @author xuey
 * @version 2017-05-15
 */
@Service
@Transactional(readOnly = true)
public class NetLiveRequisitionService extends CrudService<NetLiveRequisitionDao, NetLiveRequisition> {

	@Override
    public NetLiveRequisition get(String id) {
		return super.get(id);
	}
	
	@Override
    public List<NetLiveRequisition> findList(NetLiveRequisition netLiveRequisition) {
		return super.findList(netLiveRequisition);
	}
	
	@Override
    public Page<NetLiveRequisition> findPage(Page<NetLiveRequisition> page, NetLiveRequisition netLiveRequisition) {
		return super.findPage(page, netLiveRequisition);
	}
	
	@Override
    @Transactional(readOnly = false)
	public int save(NetLiveRequisition netLiveRequisition) {
		return super.save(netLiveRequisition);
	}
	
	@Override
    @Transactional(readOnly = false)
	public int delete(NetLiveRequisition netLiveRequisition) {
		return super.delete(netLiveRequisition);
	}

	public NetLiveRequisition findByClinicId(NetLiveRequisition netLiveRequisition) {
		return dao.findByClinicId(netLiveRequisition);
	}

	/**
	 * 获得患者未传送的信息
	 * @return
	 */
	public List<NetLiveRequisition> getInfoToSend(NetLiveRequisition liveRequisition){
		return dao.getInfoToSend(liveRequisition);
	}
	//改变发送标志
	@Transactional(readOnly = false)
	public Integer send(NetLiveRequisition liveRequisition){
		return dao.send(liveRequisition);
	}
}